import React from 'react';
import {inject, observer} from 'mobx-react';;

@inject("wfGlobalStore","wfLayoutStore")
@observer
export default class Main extends React.Component {
    
    render() {
        const {wfLayoutStore={},wfGlobalStore={}}=this.props;
        const {odocInfo={}}=wfLayoutStore;
        const { mobileInfo={}}=odocInfo;
        const { isDownload}=mobileInfo;
        const {variableMap}=wfGlobalStore;
        const odocSrc = variableMap.has(`wf-odocSrc`) ? variableMap.get(`wf-odocSrc`) : "";
        let  style={width:"100%",height:"100%"}
        const iframeDom= odocSrc ? <iframe id="req_odoc_iframe" style={style} src={odocSrc+`&chagneTopTitle=false`} />:<iframe id="req_odoc_iframe" style={style}/>;
        return (
            isDownload ?  <div style={style}></div>: iframeDom
        )
    }
}